package communication.message;

import java.util.ArrayList;

/***
 * 
 * @author Bogusław Zaręba
 *
 */

public class GameOver {
	private ArrayList<Player> players = new ArrayList<Player>();
	
	//public GameOver(Player player) {
	//	this.player = player;
	//}
	
	public void addPlayer(Player player) {
		this.players.add(player);
	}
	
	public ArrayList<Player> getPlayers() {
		return players;
	}
	
	public String toString() {
		String res = XMLTagCreator.openTag("gameOver") + '\n';
		for(Player player : players)
			res += "\t" + player.toString() + "\n";
		return res += XMLTagCreator.closeTag("gameOver");
	}
}
